package com.dangz.dans.utils;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;

/**
 * @author dangz
 * @since 2018/3/15 16:23
 */
public class OkHttpTest {
    private static final Logger logger = LoggerFactory.getLogger(OkHttpTest.class);
    public static void main(String[]  a) {
        String info = null;
        String url = "https://m.2cto.com/net/201605/505364.html";
        String fileUrl = "http://dan365.dans.top:8089/";
        try {
            //info = OkHttpHader.doGet(url);
//            info = OkHttpHader.doPostForMap(url, null, null);
            info = OkHttpHader.doPostForJosn(url, null, null);

//            OkHttpHader.downFile(url, "E:/", "505364.html");
        } catch (IOException e) {
            e.printStackTrace();
        }
        logger.info("info:{}", info);
    }
}
